.class public Llt/noframe/gpsfarmguide/utils/loader/ImageLoaderFactory;
.super Ljava/lang/Object;
.source "ImageLoaderFactory.java"


# direct methods
.method public static getFullPathToCache(Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;
    .locals 1

    .line 133
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p0}, Landroid/content/Context;->getFilesDir()Ljava/io/File;

    move-result-object p0

    invoke-virtual {p0}, Ljava/io/File;->getAbsoluteFile()Ljava/io/File;

    move-result-object p0

    invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    sget-object p0, Ljava/io/File;->pathSeparator:Ljava/lang/String;

    invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string p0, "image_loader_caches"

    invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    sget-object p0, Ljava/io/File;->pathSeparator:Ljava/lang/String;

    invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p0

    return-object p0
.end method

.method public static getImageLoader(Landroid/content/Context;I)Llt/noframe/gpsfarmguide/utils/loader/CustomImageLoader;
    .locals 5

    const-wide/32 v0, 0x2faf080

    const/4 v2, 0x0

    packed-switch p1, :pswitch_data_0

    .line 125
    new-instance p0, Ljava/lang/IllegalArgumentException;

    const-string p1, "Tried to get Image loader of unknown type"

    invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw p0

    .line 117
    :pswitch_0
    :try_start_0
    new-instance p1, Lcom/nostra13/universalimageloader/cache/disc/impl/ext/LruDiskCache;

    new-instance v0, Ljava/io/File;

    const-string v1, "ad_images"

    invoke-static {p0, v1}, Llt/noframe/gpsfarmguide/utils/loader/ImageLoaderFactory;->getFullPathToCache(Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    new-instance v1, Lcom/nostra13/universalimageloader/cache/disc/naming/HashCodeFileNameGenerator;

    invoke-direct {v1}, Lcom/nostra13/universalimageloader/cache/disc/naming/HashCodeFileNameGenerator;-><init>()V

    const-wide/32 v3, 0xf4240

    invoke-direct {p1, v0, v1, v3, v4}, Lcom/nostra13/universalimageloader/cache/disc/impl/ext/LruDiskCache;-><init>(Ljava/io/File;Lcom/nostra13/universalimageloader/cache/disc/naming/FileNameGenerator;J)V
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception p1

    .line 120
    invoke-virtual {p1}, Ljava/io/IOException;->printStackTrace()V

    move-object p1, v2

    .line 122
    :goto_0
    new-instance v0, Llt/noframe/gpsfarmguide/utils/loader/CustomImageLoader;

    invoke-direct {v0, p0, p1}, Llt/noframe/gpsfarmguide/utils/loader/CustomImageLoader;-><init>(Landroid/content/Context;Lcom/nostra13/universalimageloader/cache/disc/DiskCache;)V

    return-object v0

    .line 107
    :pswitch_1
    :try_start_1
    new-instance p1, Lcom/nostra13/universalimageloader/cache/disc/impl/ext/LruDiskCache;

    new-instance v3, Ljava/io/File;

    const-string v4, "rss_images"

    invoke-static {p0, v4}, Llt/noframe/gpsfarmguide/utils/loader/ImageLoaderFactory;->getFullPathToCache(Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    new-instance v4, Lcom/nostra13/universalimageloader/cache/disc/naming/HashCodeFileNameGenerator;

    invoke-direct {v4}, Lcom/nostra13/universalimageloader/cache/disc/naming/HashCodeFileNameGenerator;-><init>()V

    invoke-direct {p1, v3, v4, v0, v1}, Lcom/nostra13/universalimageloader/cache/disc/impl/ext/LruDiskCache;-><init>(Ljava/io/File;Lcom/nostra13/universalimageloader/cache/disc/naming/FileNameGenerator;J)V
    :try_end_1
    .catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_1

    goto :goto_1

    :catch_1
    move-exception p1

    .line 110
    invoke-virtual {p1}, Ljava/io/IOException;->printStackTrace()V

    move-object p1, v2

    .line 112
    :goto_1
    new-instance v0, Llt/noframe/gpsfarmguide/utils/loader/CustomImageLoader;

    invoke-direct {v0, p0, p1}, Llt/noframe/gpsfarmguide/utils/loader/CustomImageLoader;-><init>(Landroid/content/Context;Lcom/nostra13/universalimageloader/cache/disc/DiskCache;)V

    return-object v0

    .line 96
    :pswitch_2
    :try_start_2
    new-instance p1, Lcom/nostra13/universalimageloader/cache/disc/impl/ext/LruDiskCache;

    new-instance v0, Ljava/io/File;

    const-string v1, "workers_images"

    invoke-static {p0, v1}, Llt/noframe/gpsfarmguide/utils/loader/ImageLoaderFactory;->getFullPathToCache(Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    new-instance v1, Lcom/nostra13/universalimageloader/cache/disc/naming/HashCodeFileNameGenerator;

    invoke-direct {v1}, Lcom/nostra13/universalimageloader/cache/disc/naming/HashCodeFileNameGenerator;-><init>()V

    const-wide/32 v3, 0x1312d00

    invoke-direct {p1, v0, v1, v3, v4}, Lcom/nostra13/universalimageloader/cache/disc/impl/ext/LruDiskCache;-><init>(Ljava/io/File;Lcom/nostra13/universalimageloader/cache/disc/naming/FileNameGenerator;J)V
    :try_end_2
    .catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_2

    goto :goto_2

    :catch_2
    move-exception p1

    .line 99
    invoke-virtual {p1}, Ljava/io/IOException;->printStackTrace()V

    move-object p1, v2

    .line 101
    :goto_2
    new-instance v0, Llt/noframe/gpsfarmguide/utils/loader/CustomImageLoader;

    invoke-direct {v0, p0, p1}, Llt/noframe/gpsfarmguide/utils/loader/CustomImageLoader;-><init>(Landroid/content/Context;Lcom/nostra13/universalimageloader/cache/disc/DiskCache;)V

    return-object v0

    .line 85
    :pswitch_3
    :try_start_3
    new-instance p1, Lcom/nostra13/universalimageloader/cache/disc/impl/ext/LruDiskCache;

    new-instance v0, Ljava/io/File;

    const-string v1, "agronomists_images"

    invoke-static {p0, v1}, Llt/noframe/gpsfarmguide/utils/loader/ImageLoaderFactory;->getFullPathToCache(Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    new-instance v1, Lcom/nostra13/universalimageloader/cache/disc/naming/HashCodeFileNameGenerator;

    invoke-direct {v1}, Lcom/nostra13/universalimageloader/cache/disc/naming/HashCodeFileNameGenerator;-><init>()V

    const-wide/32 v3, 0x989680

    invoke-direct {p1, v0, v1, v3, v4}, Lcom/nostra13/universalimageloader/cache/disc/impl/ext/LruDiskCache;-><init>(Ljava/io/File;Lcom/nostra13/universalimageloader/cache/disc/naming/FileNameGenerator;J)V
    :try_end_3
    .catch Ljava/io/IOException; {:try_start_3 .. :try_end_3} :catch_3

    goto :goto_3

    :catch_3
    move-exception p1

    .line 88
    invoke-virtual {p1}, Ljava/io/IOException;->printStackTrace()V

    move-object p1, v2

    .line 90
    :goto_3
    new-instance v0, Llt/noframe/gpsfarmguide/utils/loader/CustomImageLoader;

    invoke-direct {v0, p0, p1}, Llt/noframe/gpsfarmguide/utils/loader/CustomImageLoader;-><init>(Landroid/content/Context;Lcom/nostra13/universalimageloader/cache/disc/DiskCache;)V

    return-object v0

    .line 74
    :pswitch_4
    :try_start_4
    new-instance p1, Lcom/nostra13/universalimageloader/cache/disc/impl/ext/LruDiskCache;

    new-instance v3, Ljava/io/File;

    const-string v4, "question_images"

    invoke-static {p0, v4}, Llt/noframe/gpsfarmguide/utils/loader/ImageLoaderFactory;->getFullPathToCache(Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    new-instance v4, Lcom/nostra13/universalimageloader/cache/disc/naming/HashCodeFileNameGenerator;

    invoke-direct {v4}, Lcom/nostra13/universalimageloader/cache/disc/naming/HashCodeFileNameGenerator;-><init>()V

    invoke-direct {p1, v3, v4, v0, v1}, Lcom/nostra13/universalimageloader/cache/disc/impl/ext/LruDiskCache;-><init>(Ljava/io/File;Lcom/nostra13/universalimageloader/cache/disc/naming/FileNameGenerator;J)V
    :try_end_4
    .catch Ljava/io/IOException; {:try_start_4 .. :try_end_4} :catch_4

    goto :goto_4

    :catch_4
    move-exception p1

    .line 77
    invoke-virtual {p1}, Ljava/io/IOException;->printStackTrace()V

    move-object p1, v2

    .line 79
    :goto_4
    new-instance v0, Llt/noframe/gpsfarmguide/utils/loader/CustomImageLoader;

    invoke-direct {v0, p0, p1}, Llt/noframe/gpsfarmguide/utils/loader/CustomImageLoader;-><init>(Landroid/content/Context;Lcom/nostra13/universalimageloader/cache/disc/DiskCache;)V

    return-object v0

    .line 69
    :pswitch_5
    new-instance p1, Llt/noframe/gpsfarmguide/utils/loader/CustomImageLoader;

    const-string v0, "catalog_images"

    invoke-static {p0, v0}, Llt/noframe/gpsfarmguide/utils/loader/ImageLoaderFactory;->getFullPathToCache(Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    invoke-direct {p1, p0, v0}, Llt/noframe/gpsfarmguide/utils/loader/CustomImageLoader;-><init>(Landroid/content/Context;Ljava/lang/String;)V

    return-object p1

    nop

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_5
        :pswitch_4
        :pswitch_3
        :pswitch_2
        :pswitch_1
        :pswitch_0
    .end packed-switch
.end method
